From 3219896dd77108caf6bd47899f230b4b686ccfe3 Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc kop@karlpinc.com" Date: Thu, 13 Aug 2026 14:38:17 +0000 Subject: [PATCH] Execute community v.s. entrydate check only when necessary --- db/schemas/lib/triggers/create/biography_data.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/schemas/lib/triggers/create/biography_data.m4 b/db/schemas/lib/triggers/create/biography_data.m4 index ac90525..1f445eb 100644 --- a/db/schemas/lib/triggers/create/biography_data.m4 +++ b/db/schemas/lib/triggers/create/biography_data.m4 @@ -360,7 +360,7 @@ CREATE OR REPLACE FUNCTION biography_data_func () -- An individual may not be placed in a community, that is not their -- birth community, before the individual is under study. IF TG_OP = 'UPDATE' - AND ((NEW.entrydate <> OLD.entrydate) + AND ((NEW.entrydate > OLD.entrydate) OR (NEW.birthcomm IS DISTINCT FROM OLD.birthcomm)) THEN DECLARE commmid comm_membs.commmid%TYPE; -- 2.34.1